home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-02 | 3.4 KB | 126 lines | [TEXT/MPS ] |
- /*
- File: CyberStream.idl
-
- Contains: xxx put contents here xxx
-
- Written by: the cyberdogs
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <3> 6/14/96 emt Changed property strings to be the same as MIME/HTTP.
- <6> 10/20/95 mc Synch to OpenDoc 1.0F13e
- <3> 8/18/95 emt
- <2> 2/8/95 sdh Implement new CyberStream API
-
- To Do:
- */
-
- #ifndef _CYBERSTREAM_
- #define _CYBERSTREAM_
-
- #include "ODObject.idl"
- #include "CyberMisc.idl"
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- interface CyberStream;
-
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
-
- interface ODStorageUnit;
- interface CyberStream;
- interface CyberSession;
-
-
- //==============================================================================
- // Definitions for CyberStream
- //==============================================================================
-
-
- #pragma somemittypes on
-
-
- typedef short StreamStatus;
- typedef ODISOStr CDStreamProperty;
-
- const short kCDDataAvailable = 1;
- const short kCDErrorOccurred = 2;
- const short kCDStatusStringChanged = 4;
- const short kCDBuffersAreLow = 8;
- const short kCDDownloadComplete = 16;
- const short kCDAbortComplete = 32;
-
- const short kCDTotalDataSizeUnknown = -1;
- const short kCDTotalDataSizeUnknowable = -2;
-
- const short kCDLastModTimeUnknown = -1;
- const short kCDLastModTimeUnknowable = -2;
-
- const short kCDStreamPropertyUnknown = -1;
- const short kCDStreamPropertyUnknowable = -2;
- const short kCDStreamPropertyAvailable = 1;
-
- const CDStreamProperty kCDTotalDataSizeProperty = "Content-Length"; // propertyValue is of type long
- const CDStreamProperty kCDLastModTimeProperty = "Last-Modified"; // propertyValue is of type ODTime in GMT
- const CDStreamProperty kCDLanguageProperty = "Content-Language"; // propertyValue is of type char* (null terminated)
- const CDStreamProperty kCDCharacterSetProperty = "charset"; // propertyValue is of type char* (null terminated)
-
- //==============================================================================
- // CyberStream
- //==============================================================================
-
- interface CyberStream : ODObject
- {
- StreamStatus GetStreamStatus();
- long GetTotalDataSize();
- OSErr GetStreamError();
- void GetStatusString(in Str255 message);
- ODTime GetLastModTime();
-
- ODULong GetProperty(in CDStreamProperty property, in ODULong length, in ODPtr value);
- ODULong GetPropertySize(in CDStreamProperty property);
-
- ODBoolean IsTotalDataSizeAvailable();
- ODBoolean IsLastModTimeAvailable();
- short HasProperty(in CDStreamProperty property);
-
- void Open();
-
- void GetBuffer(in Ptr* buffer, in Size* bufferSize);
- void ReleaseBuffer(in Ptr buffer);
-
- void Abort();
-
- #ifdef __SOMIDL__
- implementation
- {
- functionprefix = CyberStream__;
-
- releaseorder:
- GetStreamStatus,
- GetTotalDataSize,
- GetStreamError,
- GetStatusString,
- GetLastModTime,
- IsTotalDataSizeAvailable,
- IsLastModTimeAvailable,
- Open,
- GetBuffer,
- ReleaseBuffer,
- Abort,
- GetProperty,
- GetPropertySize,
- HasProperty;
- };
- #endif
- };
-
- #endif // _CYBERSTREAM_
-